1. Field of the Invention
The present invention relates to image processing, and more specifically to selecting text regions from an image.
2. Description of Related Art
As technological advances in digital photography continue to increase the performance of digital cameras while reducing their cost, digital cameras may become widely used as document scanners in general office environments. For example, images from a hardcopy document may be captured by a camera positioned over a desktop and digitized for further processing and display on a computer monitor. This type of scanning promotes a xe2x80x9cscan-as-you-readxe2x80x9d interface between paper and electronic media and is often referred to as xe2x80x9cover-the-deskxe2x80x9d scanning. An example of such an over-the-desk scanning system is disclosed by Wellner in U.S. Pat. No. 5,511,148 entitled xe2x80x9cInteractive Copying System.xe2x80x9d
One advantage of over-the-desk scanning versus traditional contact scanning is that of convenience because it is not necessary to remove hardcopy documents from their usual place of reading. This encourages a more casual type of scanning where a user is able to scan a small amount information from a document as it is encountered while reading. For example, a short text sequence (e.g., 5-10 words) can be recorded by a camera and then converted to coded text by applying optical character recognition (OCR).
The OCRed version of the selected text may then be copied into a softcopy document where it can be manipulated by a text editing or word processing application on a computer system. This type of scanning saves the user from having to retype the selected text into a computer system.
One approach to scanning a selected text region requires a user to select an entire block of text, which usually includes more text or words then desired. Scanning an entire block region often does not provide the user with adequate control over which words are included in the selection.
Another approach to scanning selected text regions allows a user to select the exact text region he/she is interested in scanning. A user is likely to find this type of selection more user friendly and convenient than selecting entire text blocks. An example of exact word selection is described in published European Patent Application 98304196.3 entitled xe2x80x9cText/Image Selection From Document Imagesxe2x80x9d (EP 0 881 592 A2). According to this publication, the selected text region is extracted from a multiple-bit-per pixel image and de-skewed prior to performing optical character recognition (OCR).
Another example of exact word selection is described in U.S. Pat. No. 5,517,586 entitled xe2x80x9cMethod and Apparatus For Automatically Specifying A Portion of Text From a Bitmap Image of The Textxe2x80x9d to Knowlton (herein after referred to as the xe2x80x9cKnowlton Patentxe2x80x9d). The Knowlton Patent determines various geometric specifications (e.g., lateral extent of lines of text, slope, periodicity, etc.) of a specified portion of a bitmap image in response to a user providing starting and end points. These geometric specifications may be subsequently passed to a utility that performs OCR.
The examples described above perform text selection prior to OCR. One drawback of performing text selection prior to OCR, as compared to performing text selection after OCR, is that that information derived from OCR may not be used to perform text selection. This may lead to a less responsive (i.e., increased processing time while the user is in the process of text selection) and a less reliable image processing system.
In accordance with the invention, a method, system, and a computer program product for selecting a text region from an image is described.